import React, { Component } from 'react';
import { BrowserRouter, NavLink, Route } from 'react-router-dom';
import Book from './book';
export default class index extends Component {
  render() {
    return (
      <BrowserRouter>
        <nav>
          <NavLink to="/book/1">无限恐怖</NavLink>
          <NavLink to="/book/2">斗破苍穹</NavLink>
        </nav>
        <main>
          <Route path="/book/:id" component={Book} />
        </main>
      </BrowserRouter>
    );
  }
}
